﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace MyERP.Models
{
    /// <summary>
    /// 付款表，实体类
    /// </summary>
    public class Payment
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public double PaymentMoney { get; set; }
        public DateTime CreateDateTime { get; set; }
    }
    public class PaymentConfig : IEntityTypeConfiguration<Payment>
    {
        public void Configure(EntityTypeBuilder<Payment> builder)
        {
            builder.ToTable("T_Payment");
            builder.Property(e => e.Name).HasMaxLength(20);
        }
    }
}
